
<template>
  <div class="task-warp">
    <div class="common-details">
      <customDetailsTopbar flag title="任务详情" show-right-icon @back="back">
        <template #right>
          <div class="icon-box">
            <span class="iconfont mr-1" :class="dParams.detail === '列表' ? 'active' : ''" :style="{fontSize: '0.4667rem'}" @click="changeActive('列表')">&#xe611;</span>
            <span class="iconfont" :class="dParams.detail === '统计' ? 'active' : ''" :style="{fontSize: '0.4667rem'}" @click=" changeActive('统计')">&#xe651;</span>
          </div>
        </template>
      </customDetailsTopbar>
      <div class="infoWarp listInner" :style="{ paddingBottom: '0' }">
        <div class="common_list" style="padding-top: 0;">
          <template v-if="dParams.detail === '列表'">
            <taskList />
          </template>
          <template v-else-if="dParams.detail === '统计'">
            <expertListStatistics />
          </template>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import commonList from '@/assets/mixin/commonList'
import expertListStatistics from './components/expertListStatistics.vue'
import taskList from './components/taskList.vue'
export default {
  components: { expertListStatistics, taskList },
  mixins: [commonList],
  data() {
    return {
      dParams: {
        detail: '列表'
      },
      form: {
        checkTaskName: '', // 检查计划名称
        checkType: '',
        startTime: '',
        endTime: '',
        pageNum: 1,
        pageSize: 10
      },
      pages: 0,
      total: 0,
      listData: []
    }
  },
  mounted() {
  },
  methods: {
    changeActive(active) {
      this.dParams.detail = active
    },
    back() {
      this.$router.replace({
        // path: '/task/list'
        path: '/staging/dangerTreatment',
        query: { ...this.$route.query }

      })
    }
  }
}
</script>

<style lang="scss" scoped>
.infoWarp {
  position: absolute;
  top: 90px;
  right: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding-bottom: 120px;
}
.iconfont.active {
  color: #64ebfb;
}
</style>
